#include "mythread.h"
#include <QDebug>


MyThread::MyThread(QTcpSocket *s)
{
    clientSocket = s;
}

void MyThread::run()
{
    connect(clientSocket, &QTcpSocket::readyRead, this, &MyThread::handleClientSocket);
}

void MyThread::handleClientSocket()
{
    QString s = QString(clientSocket->readAll());
    qDebug()<< s;

    // send signal by define self
    emit recvClientData(s);
}
